package com.dy.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/4/20 10:20
 * @Version 1.0 (版本)
 */
@lombok.Data
@Accessors(chain = true)
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer age;
    private String email;
    /**
     * @Version
     * 乐观锁注解
     */
    @Version
    private Integer version;
    /**
     * @TableLogic
     * 逻辑删除注解
     */
    @TableLogic
    private Integer deleted;
    /**
     * @TableField(fill = FieldFill.INSERT)
     * 进行添加操作时，自动填充
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * @TableField(fill = FieldFill.INSERT_UPDATE)
     * 进行添加及更新时，自动填充
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
